package com.alibaba.sdk.model;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

/**
 * 基础实体类
 *
 * @ writer Shawn(Shawn_0217@163.com)
 * @ date & time 2021/4/26 23:02
 * @ company alibaba
 */
public class BaseEntity implements Serializable {

    @TableId(type = IdType.AUTO)
    protected Long id;

    @TableField(fill = FieldFill.INSERT)
    protected Date createTime;

    @TableField(fill = FieldFill.UPDATE)
    protected Date updateTime;

    @TableLogic(value = "0", delval = "1")
    protected boolean deleted;

    public BaseEntity() {
    }

    public Long getId() {
        return this.id;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public Date getUpdateTime() {
        return this.updateTime;
    }

    public boolean isDeleted() {
        return this.deleted;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public void setCreateTime(final Date createTime) {
        this.createTime = createTime;
    }

    public void setUpdateTime(final Date updateTime) {
        this.updateTime = updateTime;
    }

    public void setDeleted(final boolean deleted) {
        this.deleted = deleted;
    }

    private static final long serialVersionUID = -7737748595906618172L;
}
